<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>create table</title>
<usergroup>0</usergroup>
<usergroup_edit>40</usergroup_edit>
<parent_url>/menu</parent_url>
<menu_active>1</menu_active>
<title_active>1</title_active>
<template>index.html</template>
</head>

<body>
<?php


$table = trim($_REQUEST['table']);
  //xml_config::createTable($table);
  
    $xmlDatabase = new xml_database();
  $xmlDatabase->baseDir = false;
  $xmlDatabase->xmlFilename = config::$projectPath."/db/db.xml";
  
  
  $scaffolding = false;
  if (isset($_REQUEST['scaffolding'])) {
      $scaffolding = true;
  }
  
  
  $xmlDatabase->createTable($table, $scaffolding);
  
  
  //echo $table;
  $xmlDatabase->writeXmlDatabaseFile();   
  
  
  $redirect = "/admin/db-verwaltung?table=$table";
  http::redirect($redirect);  
  
  
?>
</body>
</html>